package com.iring.domain.common;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * 通话记录
 *
 * @author wanggan
 */
@Entity
@Table(name = "t_cdr_info")
public class CallLog implements Serializable {

    private static final long serialVersionUID = -7251821012298241584L;

    @Id
    @GeneratedValue
    @Column(name = "id")
    private Integer id;

    @Column(name = "src")
    private String src;

    @Column(name = "dst")
    private String dst;

    @Column(name = "start_time", insertable = true,updatable = false)
    @Temporal(TemporalType.TIMESTAMP)
    private Date startTime;

    @Column(name = "duration")
    private Integer duration;

    @Column(name = "call_type")
    private String callType;

    @Column(name = "call_status")
    private String callStatus;

    @Column(name = "mac")
    private String mac;

    @Override
    public String toString() {
        return "{id:" + id + ",src:" + src + ",dst:" + dst + ",startTime:" + startTime + ",duration:" + duration + ",callType:" + callType + ",callStatus:" + callStatus + ",mac:" + mac + "}";
    }

    public Integer getId() {
        return id;
    }

    public String getSrc() {
        return src;
    }

    public String getDst() {
        return dst;
    }

    public Date getStartTime() {
        return startTime;
    }

    public Integer getDuration() {
        return duration;
    }

    public String getCallType() {
        return callType;
    }

    public String getCallStatus() {
        return callStatus;
    }

    public String getMac() {
        return mac;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public void setSrc(String src) {
        this.src = src;
    }

    public void setDst(String dst) {
        this.dst = dst;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public void setDuration(Integer duration) {
        this.duration = duration;
    }

    public void setCallType(String callType) {
        this.callType = callType;
    }

    public void setCallStatus(String callStatus) {
        this.callStatus = callStatus;
    }

    public void setMac(String mac) {
        this.mac = mac;
    }
}
